<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Admin\Api;
class Sgb extends Model
{
    use HasFactory;

    protected $table='zanmeidb';
    protected $primaryKey = '_id';
    public $incrementing = false;
    protected $keyType = 'string';
    protected static function booted()
    {

        static::deleted(function($form){
            $api = new Api();
            $api->deleteItem('zanmeidb',$form->_id);
            return true;

        });

        return true;
    }
}
